
#ifndef SERIALIZABLE_H
#define SERIALIZABLE_H

#include <string>
#include <stdint.h>
#include "libc2c/byte_stream.h"
#include "libc2c/pprint.h"

class ISerializable
{
public:
    virtual ~ISerializable() {};
    
public:
    virtual bool Serialize(CByteStreamNetwork& bs) = 0;  
	
	void DumpDataTree(std::ostream& os, int ident = 0)const
	{
		g_printIdent(os, ident);
		os << "this object not implement DumpDataTree" << NEW_LINE;
	}
};

class ISerializableXML
{
public:
    virtual ~ISerializableXML() {};
    
public:
    virtual bool FromXML(const std::string& sXMLContent) = 0;  
    virtual bool ToXML(std::string& sXMLContent) = 0;  
};

#endif /* SERIALIZABLE_H */
